package com.sinotopia.springboot.controller;

import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestMapping;
import com.sinotopia.springboot.mapper.*;


@RestController
public class CityController {
    
    private final  CityMapper cityMapper;
    
	public CityController(CityMapper cityMapper) {
		this.cityMapper = cityMapper;
	}
    
    @RequestMapping("/city")
    public String index() {
        //return "Greetings from Spring Boot!";
       return this.cityMapper.findById(3).getCity();
    } 
}